package net.xiangcaowuyu.mybatis.mapper;

import net.xiangcaowuyu.mybatis.entity.Role;
import net.xiangcaowuyu.mybatis.entity.User;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface UserMapper {

    /**
     * 根据Id查找
     * @param id
     * @return
     */
    User selectByPrimaryKey(Integer id);

    /**
     * 根据用户查找角色列表
     * @param uid
     * @return
     */
    List<Role> getRolesByUid(@Param("uid") Integer uid);
}